<%--
  Created by IntelliJ IDEA.
  User: cloudoer
  Date: 2018/4/11
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>admin</title>
    <!-- 引入css文件，不限顺序 -->
    <link rel="stylesheet" href="<%=basePath%>/jslibs/layui/css/layui.css"></link>
    <link rel="stylesheet" href="<%=basePath%>/jslibs/kindeditor/themes/default/default.css">
    <link rel="stylesheet" href="<%=basePath%>/jslibs/kindeditor/plugins/code/prettify.css" />

    <!-- 引入js文件，有顺序限制 -->
    <script type="text/javascript" src="<%=basePath%>jslibs/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>jslibs/layui/layui.js"></script>
    <script type="text/javascript" src="<%=basePath%>jslibs/kindeditor/kindeditor-all.js"></script>
    <script type="text/javascript" src="<%=basePath%>jslibs/kindeditor/zh-CN.js"></script>
    <script type="text/javascript" charset="utf-8" src="<%=basePath%>jslibs/kindeditor/plugins/code/prettify.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/base.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">blog 后台管理</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="<%=basePath%>jslibs/layui/images/user.png" class="layui-nav-img">小东
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item"><a id="admin_index_menu" href="javascript:;">菜单管理</a></li>
                <li class="layui-nav-item"><a id="admin_index_type" href="javascript:;">类型管理</a></li>
                <li class="layui-nav-item"><a id="admin_index_article" href="javascript:;">文章管理</a></li>
                <li class="layui-nav-item"><a id="admin_index_tag" href="javascript:;">标签管理</a></li>
                <li class="layui-nav-item"><a href="javascript:;">云市场</a></li>
                <li class="layui-nav-item"><a href="javascript:;">发布商品</a></li>
            </ul>
        </div>
    </div>

    <div id="admin_index_content" class="layui-body">
        <!-- 内容主体区域 -->
            123
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script>
    var _admin_index_js = {
        menu_clike_load:function () {
            $('#admin_index_menu').on('click',function () {
                $('#admin_index_content').load('/menu/index.action');
            });
            $('#admin_index_type').on('click',function () {
                $('#admin_index_content').load('/type/index.action');
            });
            $('#admin_index_article').on('click',function () {
                $('#admin_index_content').load('/article/index.action');
            });
            $('#admin_index_tag').on('click',function () {
                $('#admin_index_content').load('/tag/index.action');
            });
        }
    }

    var admin_index_app = (function () {
        $(function () {
            layui.use('element', function(){
                var element = layui.element;
            });
            _admin_index_js.menu_clike_load();
        });
    })();

</script>
</body>
</html>
